using System;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Xml;

using OR.Reuse.Persistence;

using DataAccess = OR.MyGoals.DataAccess;
using Derived = OR.MyGoals.Model;

namespace OR.MyGoals.Model.Generated
{
    public class GoalRequiredExpertiseCollectionBase : ModelCollectionBase<Derived.GoalRequiredExpertise, Derived.MyGoalsDataManager>
    {
          public void List()
          {
            DataAccess.GoalRequiredExpertise accessGoalRequiredExpertise = new DataAccess.GoalRequiredExpertise();

              DataSet result = accessGoalRequiredExpertise.List();

              Debug.Assert(result != null);
              
              if (result.Tables.Count > 0)
              {
                  DataTable sourceTable = result.Tables[0];
                  
                  foreach (DataRow currentRow in sourceTable.Rows)
                  {
                      Derived.GoalRequiredExpertise newEntity = new Derived.GoalRequiredExpertise(this.DataManager);
                      newEntity.Load(currentRow);
                      
                      this.Add(newEntity);
                  }
              }
          }
      

          public GoalRequiredExpertiseCollectionBase(Derived.MyGoalsDataManager manager) : base(manager)
          { }
    
    }
}